package com.jsbs.iam.ident.mapper;

import com.jsbs.iam.ident.entity.IamLoginStrategy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface IamLoginStrategyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(IamLoginStrategy record);

    int insertSelective(IamLoginStrategy record);

    IamLoginStrategy selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(IamLoginStrategy record);

    int updateByPrimaryKey(IamLoginStrategy record);

    /**
     * sso登录查询（查询一个应用下面所有的登录方式）
     * @return
     */
    List<IamLoginStrategy> getIamLoginStrategy (@Param("applyTypeCode") String applyTypeCode,
                                                @Param("companyCode") String companyCode);

    /**
     * 新增登录策略
     * @param iamLoginStrategyList
     * @return
     */
    int saveIamLoginStrategy(@Param("iamLoginStrategyList") List<IamLoginStrategy> iamLoginStrategyList);

    /**
     * 根据应用类型删除登录策略
     * @param applyTypeCode
     * @param applyTypeCode
     * @return
     */
    int deleteApplyCode (@Param("applyTypeCode") String applyTypeCode);
}